﻿using System;
using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using LeadThing.AbpZeroTemplate.Notifications.Dto;
using Abp.Notifications;
using System.Collections.Generic;

namespace LeadThing.AbpZeroTemplate.Notifications
{
    public interface INotificationAppService : IApplicationService
    {
        #region 实体的自定义扩展方法

        /// <summary>
        /// 根据查询条件获取消息通知分页列表
        /// </summary>
        Task<GetNotificationsExtendOutput> GetPagedUserNotificationsAsync(GetUserNotificationsInput input);

        /// <summary>
        /// 根据UserId获取消息通知列表
        /// </summary>
        Task<GetNotificationsExtendOutput> GetUserNotificationsByUserIdAsync(GetUserNotificationsInput input);

        /// <summary>
        /// 批量创建消息通知
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task BatchCreateNotification(NotificationEditDto input);

        /// <summary>
        /// 根据userNotificationId获取消息通知
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<UserNotification> GetUserNotificationByIdAsync(GetUserNotificationByIdInput input);

        /// <summary>
        /// 根据userNotificationId删除消息通知
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task DeleteUserNotificationByIdAsync(GetUserNotificationByIdInput input);

        #endregion

        #region 消息通知管理

        Task<GetNotificationsOutput> GetUserNotifications(GetUserNotificationsInput input);

        Task SetAllNotificationsAsRead();

        Task SetNotificationAsRead(EntityDto<Guid> input);

        Task<GetNotificationSettingsOutput> GetNotificationSettings();

        Task UpdateNotificationSettings(UpdateNotificationSettingsInput input);

        #endregion

        #region APP接口

        /// <summary>
        /// 根据查询条件获取消息通知分页列表
        /// </summary>
        Task<PagedResultDto<UserNotificationAPP>> GetPagedNotificationAPPAsync(GetUserNotificationsAPPInput input);
        Task<UserNotificationSingleAPP> GetNotificationByIDAPPAsync(GetUserNotificationByIdInput input);

        #endregion

    }
}